package com.ks.core.framework.cpsupload.demos.orderpayinvoice.orderhandler;

import com.ks.core.framework.cpsupload.demos.orderpayinvoice.constant.InvoiceType;

// 已支付状态处理器
class PaidStateHandler implements OrderStateHandler {
    @Override
    public void handle(Order order) {
        // 扣减库存
        InventoryService.reduceInventory(order.getOrderType(), order.getItemId());
        
        // 生成发票
        InvoiceService.generateInvoice(order, InvoiceType.BLUE);
    }
}